import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: MyHome('123', '我是内容哦'),
  ));
}

// StatelessWidget 无状态组件
class MyHome extends StatelessWidget {
  MyHome(this.title, this.content);

  String title = 'moren';

  String content = 'content';

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      // 1.1 导航
      appBar: AppBar(
        backgroundColor: Colors.orange,
        title: Text(title),
      ),
      // 1.2 主体部分
      // 帮我调整 Text 的代码 实现 超出部分 ...
      body: Center(
        child: Container(
          // width: 400,
          // height: 200,
          // color: Colors.orange,
          child: Stack(
              alignment: Alignment.center,
              clipBehavior: Clip.none,// 超出部分不裁剪
              children: [// 重叠的组件
                Container(
                  width: 200,
                  height: 200,
                  color: Colors.lightBlueAccent,
                ),
                // positioned 设置位置
                Positioned(top: -100, child: Image.asset('open_eyes.png')),
                Positioned(left: -100, child: Image.asset('open_eyes.png')),
                Positioned(right: -100, child: Image.asset('open_eyes.png')),
                Positioned(bottom: -100, child: Image.asset('open_eyes.png')),
              ]),
        ),
      ),
    );
  }
}
